import Vue from 'vue';
import VueRouter from 'vue-router';
import App from './App.vue';
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import VoteList from './components/VoteList.vue';
import VoteDetail from './components/VoteDetail.vue';

Vue.config.productionTip = false;
Vue.use(ElementUI)
Vue.use(VueRouter);

const router = new VueRouter({
  routes: [
    { path: '/', component: VoteList },
    { path: '/vote/:id', component: VoteDetail },
  ],
});

new Vue({
  router,
  render: h => h(App)
}).$mount('#app');